﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Uploadmanage.aspx.cs" Inherits="WebSystem.Uploadmanage" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register TagPrefix="Upload" Namespace="Brettle.Web.NeatUpload" Assembly="Brettle.Web.NeatUpload" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <base target="_self" />
    <title>文件上传</title>

    <script language="javascript" type="text/javascript">
    function CheckValue(result)
    {       
        alert(result);        
    }
   
    function GetFileType()
    {     
        var uploadvalues = document.getElementById("flAccessory").value;
        if(uploadvalues != "" && uploadvalues != null)
        {
            var valuelength = uploadvalues.split(".");  
            var Countvalue = "." + valuelength[valuelength.length-1]; 
            GetUploadFileType.GetType(Countvalue,Changedvalue);
        }
    }
    
    function Changedvalue(filetype)
    {
        if(filetype)
        {
            document.getElementById("Button1").style.display="";
        }
        else
        {
            alert("非法的上传");
            document.getElementById("Button1").style.display="none";
        }
        

    }
    </script>

</head>
<body style="background-color:#fcf6ec">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="scriptmanager_a" runat="server">
            <Services>
                <asp:ServiceReference Path="WebSystem.GetUploadFileType.asmx" />
            </Services>
        </asp:ScriptManager>
        <div style="height: 200px; text-align: center; vertical-align: middle; background-image: url(Images/bj3.jpg);">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td style="height: 8px; width: 251px;">
                    </td>
                </tr>
                <tr>
                    <td style="padding-top: 25px; width: 251px; height: 30px;">
                        <%--<input id="flAccessory" runat="server" contenteditable="false" enableviewstate="false"
                            type="file" />--%>
                        <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td style="width: 250px; height: 60px; padding-left: 10px" valign="top">
                                    <table style="width: 250px; height: 30px" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td valign="top" style="width: 228px; height: 30px">
                                                <Upload:InputFile ID="flAccessory" runat="server" />
                                                <Upload:ProgressBar ID="progress" runat="server" Triggers="Button1">
                                                </Upload:ProgressBar>
                                            </td>
                                            <td valign="top" style="width: 50px; height: 30px; padding-left: 5px">
                                                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="上传" />
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width: 270px; height: 10px; font-size: 13px" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="width: 250px; padding-left: 30px" align="Center">
                                                <asp:Label ForeColor="Red" ID="Label1" runat="server"></asp:Label></td>
                                        </tr>
                                    </table>
                                </td>
                                <td valign="top" style="height: 60px; padding-left: 3px; font-size: 12px" align="right">
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="left" style="height: 19px">
                        <span style="color: Red; font-size: 13px">*</span>&nbsp;<span style="font-size: 13px">
                            上传文件的类型只能是：<%= lblMessage1%>
                            <asp:Label ID="lblMessage" runat="server" Width="100px" Visible="false"></asp:Label>KB</span></td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
